home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 049a.dms / 049a.adf / SOURCE_CODE / AJC-SNOT!.AMOS / AJC-SNOT!.amosSourceCode next >
AMOS Source Code  |  1993-09-09  |  2KB  |  79 lines

  1. '
  2. '   AN ANIMATED BLOB OF SNOT 
  3. '   By Andrew Campbell 1993
  4. '
  5. '   Control the blob with a joystick.  
  6. '   Feel free to rip off/enhance...  etc etc 
  7. '
  8. '
  9. SNOT
  10.  
  11. Procedure SNOT
  12.  
  13. Get Sprite Palette 
  14. Curs Off : Flash Off : Hide On 
  15. X1=150 : Y1=100
  16. For I=1 To 15 : Channel I To Bob I : Next I
  17. Double Buffer 
  18. '
  19. ST:
  20. Bob 1,X1,Y1-100,17 : Wait Vbl 
  21. A$="Loop : M 0,100,10 ; Jump Loop" : Amal 1,A$ : Amal On 1
  22. Wait 10 : Amal Off 1
  23. A$="Anim 1,(18,5)(19,5)(20,20)(21,7)(22,7)(23,7)(14,7)(13,7)(12,7)(11,7)" : Amal 1,A$ : Amal On 1
  24. Wait 79
  25. '
  26. Timer=0
  27. FACINGL=1
  28. '
  29. LP:
  30. VV=Timer/50
  31. BLINK=0
  32. Repeat : 
  33. '
  34. If BLINK=0 and Timer/50=VV+4 Then BLINK=1 : A$="Anim 0,(7,80)(8,6)(9,6)(10,6)(9,5)(8,6)" : Amal 1,A$ : Amal On 1
  35. '
  36. L=0 : R=0 : U=0 : D=0
  37. '
  38. If Jleft(1) Then FACINGL=1 : FACINGR=0 : L=1 : Gosub A_LEFT : Goto LP
  39. If Jright(1) Then FACINGR=1 : FACINGL=0 : R=1 : Gosub A_RIGHT : Goto LP
  40. If Jup(1) Then U=1 : Gosub A_UP : Goto LP
  41. If Jdown(1) Then D=1 : Gosub A_DOWN : Goto LP
  42. If Fire(1) Then Goto ST
  43. '
  44. Until WIN=1
  45. '
  46. '------  
  47. A_LEFT:
  48. A$="Anim 0,(4,3)(5,3)(6,3) ; Loop : M -1,0,1 ; Jump Loop" : Amal 1,A$ : Amal On 1
  49. Repeat : 
  50. Until Joy(1)<>4 : Amal Off 1
  51. Return 
  52. '
  53. A_RIGHT:
  54. A$="Anim 0,(1,3)(2,3)(3,3) ; Loop : M 1,0,1 ; Jump Loop" : Amal 1,A$ : Amal On 1
  55. Repeat : 
  56. Until Joy(1)<>8 : Amal Off 1
  57. Return 
  58. '
  59. A_UP:
  60. If FACINGL=1 Then Amal 1,"Anim 1,(3,1)(25,50)" : Amal On 1
  61. If FACINGR=1 Then Amal 1,"Anim 1,(6,1)(25,50)" : Amal On 1
  62. A$="Loop : M 0,-10,2 ; M 0,-10,3 ; M 0,-10,4 : M 0,-10,5 ;"
  63. A$=A$+"M 0,10,5 ; M 0,10,4 ; M 0,10,3 : M 0,10,2 ; Jump Loop"
  64. Amal 1,A$ : Amal On 1
  65. Repeat : 
  66. Until Joy(1)<>1 : Amal Off 1 : Return 
  67. Return 
  68. '
  69. A_DOWN:
  70. A$="Anim 1,(11,3)(12,3)(13,3)(14,3)" : Amal 1,A$ : Amal On 1
  71. Repeat : 
  72. Until Joy(1)<>2 : Amal Off 1
  73. RAT:
  74. If Joy(1)=6 Then A$="Anim 0,(14,3)(15,3)(16,3) ; Loop : M -1,0,1 ; Jump Loop" : Amal 1,A$ : Amal On 1 : Repeat : Until Joy(1)<>6 : Amal Off 1 : Goto RAT
  75. If Joy(1)=10 Then A$="Anim 0,(16,3)(15,3)(14,3) ; Loop : M 1,0,1 ; Jump Loop" : Amal 1,A$ : Amal On 1 : Repeat : Until Joy(1)<>10 : Amal Off 1 : Goto RAT
  76. If Joy(1)=0 Then A$="Anim 1,(14,3)(13,3)(12,3)(11,3)" : Amal 1,A$ : Amal On 1 : Return 
  77. Return 
  78. '------
  79. End Proc